// 表单字段类型定义
const FormDataType = [
    "number",   // id
    "number",   // couponType
    "string",   // name
    "number",   // amount
    "number",   // discount
    "number",   // conditionAmount
    "number",   // publishCount
    "number",   // perLimit
    "number",   // useCount
    "number",   // receiveCount
    "dateTime", // expireTime
    "string",   // description
    "number",   // status
    "dateTime", // createTime
    "dateTime", // updateTime
    "number"    // isDeleted
];

// 表单默认数据
const FormData = {
    id: null,
    couponType: null,
    name: "",
    amount: null,
    discount: null,
    conditionAmount: null,
    publishCount: null,
    perLimit: null,
    useCount: null,
    receiveCount: null,
    expireTime: null,
    description: "",
    status: null,
    createTime: null,
    updateTime: null,
    isDeleted: null
};

// 字段标签
const labels = {
    id: "id",
    couponType: "优惠卷类型 1 现金券 2 折扣",
    name: "优惠卷名字",
    amount: "金额",
    discount: "折扣：取值[1 到 10]",
    conditionAmount: "使用门槛 0->没门槛",
    publishCount: "发行数量，0->无限制",
    perLimit: "每人限领张数，0-不限制 1-限领1张 2-限领2张",
    useCount: "已使用数量",
    receiveCount: "领取数量",
    expireTime: "过期时间",
    description: "优惠券描述",
    status: "状态[0-未发布，1-已发布， -1-已过期]",
    createTime: "创建时间",
    updateTime: "更新时间",
    isDeleted: "删除标记（0:不可用 1:可用）"
};

// 选项配置
const options = {
    couponType: [
        { value: 1, label: "现金券" },
        { value: 2, label: "折扣" }
    ],
    status: [
        { value: 0, label: "未发布" },
        { value: 1, label: "已发布" },
        { value: -1, label: "已过期" }
    ],
    isDeleted: [
        { value: 0, label: "不可用" },
        { value: 1, label: "可用" }
    ],
    perLimit: [
        { value: 0, label: "不限制" },
        { value: 1, label: "限领1张" },
        { value: 2, label: "限领2张" }
    ]
};

// 统一导出配置
export const CouponTableConfig = {
    FormData,
    FormDataType,
    labels,
    options
};